import com.lbi.core.events.Event;
import com.lbi.core.events.EventDispatcher;
import com.lbi.core.helper.Delegate;
import com.lbi.framework.mvc.model.EventMapper;

import example.app.models.Person;
/**
 * @author michaelforrest
 */
class example.app.models.App extends EventMapper{

	private static var instance : App;
	
	public static function getInstance() : App {
		if(!instance) instance = new App();
		return instance;
		
	}
	public function App() {
		var person_events : EventDispatcher = Person.prepare();
		person_events.addEventListener(Event.READY,Delegate.create(this,onReady));
	}

	private function onReady() : Void {
		dispatchEvent(new Event(Event.READY));
	}
 
}